/*
 * Main.java
 *
 *  Copyright (C) - 27 de septiembre de 2007 - juan b cabral
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package bts;

import bts.util.DMesg;
import bts.var.Info;
import bts.view.MainJFrame;

/**
 *
 * @author  juan
 */
public class Main {
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        for(int i=0;i<args.length;i++){
            if(args[i].toLowerCase().compareTo("-d")==0) DMesg.setEnableOuput(true);
        }
        
        DMesg.outln("Debug Mode ON.");
        DMesg.outln("Init " + Info.PROGRAM_NAME + ".");
        DMesg.outln(Info.LICENSE_RESUME);
        DMesg.outln("Setting System LnF.");
        
        try {
            javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
        } catch (Exception e) {
            String error="Failure in charge system Look and Feel";
            DMesg.err(e, error );
            javax.swing.JOptionPane.showMessageDialog(null,error, "ERROR", javax.swing.JOptionPane.ERROR_MESSAGE);
        }
        
        MainJFrame.getInstance().setVisible(true);
    }
    
}
